import App from './App'
import jump from './common/js/navigate.js'
import filter from './common/js/filter.js'

// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
App.mpType = 'app'

// onlaunch接口请求完成
Vue.prototype.$onLaunched = new Promise(resolve => {
    Vue.prototype.$isResolve = resolve;
});
Vue.prototype.$jump = jump;
Vue.prototype.$filter = filter;

const app = new Vue({...App})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue';

export function createApp() {
    const app = createSSRApp(App);
    app.config.globalProperties.$onLaunched = new Promise(resolve => {
        app.config.globalProperties.$isResolve = resolve;
    }); // onlaunch接口请求完成
    app.config.globalProperties.$jump = jump;   // 封装跳转
    app.config.globalProperties.$filter = filter;   // 自定义格式化
    return { app }
}
// #endif
